<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
		
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>添加考核</title>
		<link href="css/gl/tjkh.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" href="css/jquery/jquery-ui-1.8.14.custom.css" />
		<script type="text/javascript" src='dwr/engine.js'>
</script>
		<script type="text/javascript" src='dwr/util.js'>
</script>
		<script type="text/javascript" src="script/jquery/jquery-1.5.1.min.js">
</script>
		<script type="text/javascript"
			src="script/jquery/jquery-ui-1.8.14.custom.min.js">
</script>
		<script type="text/javascript"
			src="script/jquery/jquery.ui.datepicker-zh-CN.js">
</script>
		<script type="text/javascript" src='dwr/interface/ExamDwr.js'>
</script>
		<script type="text/javascript" src="script/util.js">
</script>
		<script type="text/javascript" src="script/gl/tjkh.js">
</script>
        <script type="text/javascript" src="script/gl/PagerHelper.js">
</script>
<script type="text/javascript">


$(function() {
	GetList();
});
</script>
	</head>

	<body>
		<div id="page_all">
			<jsp:include page="title.jsp" flush="true">
				<jsp:param name="jspName" value="khModuleOpt" />
			</jsp:include>
			<div id="main">
				<div id="tgleft">
					<jsp:include page="khleft.jsp" flush="true">
						<jsp:param name="jspName" value="tjkh" />
					</jsp:include>
				</div>
				<div id="tgmain">
					<table id="addnotice" cellpadding="0" cellspacing="0">
						<tr>
							<td class="ftd">
								<span style="display: block;float:left;">考核名称:</span>
							</td>
							<td>
								<input id="khname" name="khname" maxlength="50">
							</td>
						</tr>
						<tr>
							<td class="ftd" style="vertical-align: top;">
								<span style="display: block;float:left;margin:3px 0px 0 0px;">起止日期:
								</span>
							</td>
							<td style="padding-top:3px; ">
								<input id="search_start" class="date" readonly="readonly"
								style="" type="text">
								<span style="display: block;float:left;margin:3px 10px 0 10px;">至</span>
								<input id="search_end" class="date" readonly="readonly" style=""
								type="text">
							</td>
						</tr>
						<tr>
							<td class="ftd" style="padding-top:5px; ">
								<span style="display: block;float:left;">答题时间:</span>
							</td>
							<td style="padding-top:5px; ">
							<select id="timelong">
							  <option value="10">10分钟</option>
							  <option value="20">20分钟</option>
							  <option value="30">30分钟</option>
							  <option value="40">40分钟</option>
							  <option value="50">50分钟</option>
							  <option value="60">60分钟</option>
							  <option value="70">70分钟</option>
							  <option value="80">80分钟</option>
							  <option value="90">90分钟</option>
							  <option value="100">100分钟</option>
							  <option value="110">110分钟</option>
							  <option value="120">120分钟</option>
							</select>
							</td>
						</tr>
						<tr>
							<td class="ftd">
								<span style="display: block;float:right;margin-right:2px;">一等奖:</span>
							</td>
							<td style="padding-top:8px; ">
							  <span style="display: block;float:left;margin:3px 0px 0 20px;"> 获奖人数：</span>
							  <input id="ad1key" type="text" class="hjrs" >
							  <span style="display: block;float:left;margin:3px 0px 0 20px;"> 奖品：</span>
							  <select id="ad1aid">
							    <option value="0">请选择</option>
							    <c:if test="${!empty ad1list}">
						          <c:forEach items="${ad1list }" var="award">
		                              <option value="${award.id }">${award.name }</option>
						          </c:forEach>
								</c:if>
							  </select>
							</td>
						</tr>
						<tr>
							<td class="ftd">
								<span style="display: block;float:right;margin-right:2px;">二等奖:</span>
							</td>
							<td style="padding-top:8px; ">
							  <span style="display: block;float:left;margin:3px 0px 0 20px;"> 获奖人数：</span>
							  <input id="ad2key" type="text" class="hjrs" >
							  <span style="display: block;float:left;margin:3px 0px 0 20px;"> 奖品：</span>
							  <select id="ad2aid">
							    <option value="0">请选择</option>
                                    <c:if test="${!empty ad2list}">
						          <c:forEach items="${ad2list }" var="award">
		                              <option value="${award.id }">${award.name }</option>
						          </c:forEach>
								</c:if>
							  </select>
							</td>
						</tr>
						<tr>
							<td class="ftd">
								<span style="display: block;float:right;margin-right:2px;">三等奖:</span>
							</td>
							<td style="padding-top:8px; ">
							  <span style="display: block;float:left;margin:3px 0px 0 20px;"> 获奖人数：</span>
							  <input id="ad3key" type="text" class="hjrs" >
							  <span style="display: block;float:left;margin:3px 0px 0 20px;"> 奖品：</span>
							  <select id="ad3aid">
							    <option value="0">请选择</option>
							    <c:if test="${!empty ad3list}">
						          <c:forEach items="${ad3list }" var="award">
		                              <option value="${award.id }">${award.name }</option>
						          </c:forEach>
								</c:if>
							  </select>
							</td>
						</tr>
					</table>
					<div class="bunpanel" style="">
				       <div class="radiopanel">
				         <input type="radio" name="choosePanel" checked="checked" value="0" onclick="choosePanel(0)"><span class="spno">自动添加考核</span>
				         <input type="radio" name="choosePanel"  value="1" onclick="choosePanel(1)" style="margin-left: 50px;"><span class="spno">手动添加考核</span>
				       </div>
				       <div class='clear'></div>
				       <div id="autoti">
				           <table class="autotable" cellpadding="0" cellspacing="0">
				             <tr>
				              <td class="tixing">选择题：&nbsp;&nbsp;&nbsp;</td>
				              <td class="tinandu">
				                <span class="spndu"> 难度：</span>
				                <select class="selectdu" id="xzlevel" name="xzlevel">
		                           <option value="0">请选择</option>
		                           <option value="1">容易</option>
		                           <option value="2">普通</option>
		                           <option value="3">困难</option>
				                </select>
				              </td>
				              <td class="kongde"></td>
				             </tr>
				             <tr style="min-height: 100px;">
				             <td class="tixing"></td>
				              <td class="tinandu" style="height: 50px;">
				                 <c:if test="${!empty xzcates}">
						          <c:forEach items="${xzcates }" var="ques">
		                              <div class="options">
				                        <input type="checkbox" name="xztypes" value="${ques.id }">
				                          <c:choose> 
										    <c:when test="${fn:length(ques.name) > 10}"> 
										      <span  title="${ques.name}">${fn:substring(ques.name, 0, 10)}</span>
										    </c:when> 
										    <c:otherwise> 
										      <span title="${ques.name}">${ques.name}</span>
										    </c:otherwise>
										   </c:choose>
				                      </div> 
						          </c:forEach>
								 </c:if>
								  <c:if test="${empty xzcates}">
		                              <div class="options" style="width:200px;">
				                                                                 该题型还没有超过10道题的分类
				                      </div> 
								 </c:if>   
				              </td>
				              <td class="kongde"></td>
				             </tr>
				             <tr><td style="height:10px;" colspan="3"></td></tr>
				           </table>
				           <table class="autotable" cellpadding="0" cellspacing="0">
				             <tr>
				              <td class="tixing">填空题：&nbsp;&nbsp;&nbsp;</td>
				              <td class="tinandu">
				                <span class="spndu"> 难度：</span>
				                <select class="selectdu" id="tklevel" name="tklevel">
		                           <option value="0">请选择</option>
		                           <option value="1">容易</option>
		                           <option value="2">普通</option>
		                           <option value="3">困难</option>
				                </select>
				              </td>
				              <td class="kongde"></td>
				             </tr>
				             <tr style="min-height: 100px;">
				             <td class="tixing"></td>
				              <td class="tinandu" style="height: 50px;">
				                  <c:if test="${!empty tkcates}">
						          <c:forEach items="${tkcates }" var="ques">
		                              <div class="options">
				                        <input type="checkbox" name="tktypes" value="${ques.id }">
                                           <c:choose> 
										    <c:when test="${fn:length(ques.name) > 10}"> 
										      <span  title="${ques.name}">${fn:substring(ques.name, 0, 10)}</span>
										    </c:when> 
										    <c:otherwise> 
										      <span title="${ques.name}">${ques.name}</span>
										    </c:otherwise>
										   </c:choose>
				                      </div> 
						          </c:forEach>
								 </c:if>
								  <c:if test="${empty tkcates}">
		                             <div class="options" style="width:200px;">
				                                                                 该题型还没有超过10道题的分类
				                      </div> 
								 </c:if>                     
				              </td>
				              <td class="kongde"></td>
				             </tr>
				             <tr><td style="height:10px;" colspan="3"></td></tr>
				           </table>
				           <table class="autotable" cellpadding="0" cellspacing="0">
				             <tr>
				              <td class="tixing">判断题：&nbsp;&nbsp;&nbsp;</td>
				              <td class="tinandu">
				                <span class="spndu"> 难度：</span>
				                <select class="selectdu" id="pdlevel" name="pdlevel">
		                           <option value="0">请选择</option>
		                           <option value="1">容易</option>
		                           <option value="2">普通</option>
		                           <option value="3">困难</option>
				                </select>
				              </td>
				              <td class="kongde"></td>
				             </tr>
				             <tr style="min-height: 100px;">
				             <td class="tixing"></td>
				              <td class="tinandu" style="height: 50px;">
				                  <c:if test="${!empty pdcates}">
						          <c:forEach items="${pdcates }" var="ques">
		                              <div class="options">
				                        <input type="checkbox" name="pdtypes" value="${ques.id }">
				                         <c:choose> 
										    <c:when test="${fn:length(ques.name) > 10}"> 
										      <span  title="${ques.name}">${fn:substring(ques.name, 0, 10)}</span>
										    </c:when> 
										    <c:otherwise> 
										      <span title="${ques.name}">${ques.name}</span>
										    </c:otherwise>
										 </c:choose>
				                      </div> 
						          </c:forEach>
								 </c:if>  
								  <c:if test="${empty pdcates}">
		                              <div class="options" style="width:200px;">
				                                                                 该题型还没有超过10道题的分类
				                      </div> 
								 </c:if>                     
				              </td>
				              <td class="kongde"></td>
				             </tr>
				             <tr><td style="height:10px;" colspan="3"></td></tr>
				           </table>
				           <table class="autotable" cellpadding="0" cellspacing="0">
				             <tr>
				              <td class="tixing">简答题：&nbsp;&nbsp;&nbsp;</td>
				              <td class="tinandu">
				                <span class="spndu"> 难度：</span>
				                <select class="selectdu" id="jdlevel" name="xzlevel">
		                           <option value="0">请选择</option>
		                           <option value="1">容易</option>
		                           <option value="2">普通</option>
		                           <option value="3">困难</option>
				                </select>
				              </td>
				              <td class="kongde"></td>
				             </tr>
				             <tr style="min-height: 100px;">
				             <td class="tixing"></td>
				              <td class="tinandu" style="height: 50px;">
				                  <c:if test="${!empty jdcates}">
						          <c:forEach items="${jdcates }" var="ques">
		                              <div class="options">
				                        <input type="checkbox" name="jdtypes" value="${ques.id }">
                                           <c:choose> 
										    <c:when test="${fn:length(ques.name) > 10}"> 
										      <span  title="${ques.name}">${fn:substring(ques.name, 0, 10)}</span>
										    </c:when> 
										    <c:otherwise> 
										      <span title="${ques.name}">${ques.name}</span>
										    </c:otherwise>
										   </c:choose>
				                      </div> 
						          </c:forEach>
								 </c:if>    
								 <c:if test="${empty jdcates}">
		                              <div class="options" style="width:200px;">
				                                                                 该题型还没有超过5道题的分类
				                      </div> 
								 </c:if>                       
				              </td>
				              <td class="kongde"></td>
				             </tr>
				             <tr><td style="height:10px;" colspan="3"></td></tr>
				           </table>
				       </div>
				       <div id="selfti">
				          <div id="tiaojian">
				            <table style=" font-size: 13px; margin-top:9px;margin-left:10px;" cellpadding="0" cellspacing="0">
								<tr>
									<td>
										分类:
									</td>
									<td style="width:110px;">
										<select id="kind" name="kind">
											<option value="0">
												请选择
											</option>
											 <c:if test="${!empty zslist}">
									          <c:forEach items="${zslist }" var="zs">
					                              <option value="${zs.id }">${zs.name }</option>
									          </c:forEach>
											</c:if>
										</select>
									</td>
									<td>
										&nbsp;题型:
									</td>
									<td style="width:110px;">
										<select id="type" name="type">
											<option value="4">请选择</option>
											<option value="0">选择题</option>
											<option value="1">填空题</option>
											<option value="2">判断题</option>
											<option value="3">简答题</option>
										</select>
									</td>
									<td>
										&nbsp;难度:
									</td>
									<td style="width:180px;">
										<select id="level" name="level">
											<option value="0">请选择</option>
											<option value="1">容易</option>
											<option value="2">普通</option>
											<option value="3">困难</option>
										</select>
									</td>
									<td style="width:60px;">
										<img alt="" src="img/gl/07.jpg" style="cursor: pointer;"
											onclick="Search()" />
									</td>
									<td>
										<img alt="" src="img/gl/08.jpg" style="cursor: pointer;"
											onclick="Reset()" />
									</td>
								</tr>
							</table>
				          </div>
				          <div id="sdmain">
				            <div id="sdleft">
				             <table id="sdtis" class="sdtible" cellpadding="0" cellspacing="0">
				             
				             </table>
				            </div>
				            <div id="sdmid">
				              <img alt="" class="selectimg" style="margin-top:120px;" onclick="AddSelect()" src="img/gl/youjt.jpg" >
				              <img alt="" class="selectimg" style="margin-top:5px;"  onclick="AddSelectMore()" src="img/gl/youduojt.jpg" >
				              <img alt="" class="selectimg" style="margin-top:15px;" onclick="DelSelect()" src="img/gl/zuojt.jpg" >
				              <img alt="" class="selectimg" style="margin-top:5px;" onclick="DelSelectMore()" src="img/gl/zuoduojt.jpg" >
				            </div>
				            <div id="sdright">
				               <table id="sdxz" class="sdtible" cellpadding="0" cellspacing="0">
					            </table>
					            <table id="sdtk" class="sdtible1" cellpadding="0" cellspacing="0">
					            </table>
					            <table id="sdpd" class="sdtible1" cellpadding="0" cellspacing="0">
					            </table>
					            <table id="sdjd" class="sdtible1" cellpadding="0" cellspacing="0">
					            </table>
				            </div>
				          </div>
				       </div>
				       <div id="sdbottom">
				        <div id="pager"></div>
				        <div id="sdticount">
				          <table cellpadding="0" cellspacing="0" style="font-size:13px;margin-top:3px;">
				            <tr><td style="width:120px;height:18px;">选择题：<span id="sdxzcount" >0</span>/10</td><td>填空题：<span id="sdtkcount">0</span>/10</td></tr>
				            <tr><td>判断题：<span id="sdpdcount">0</span>/10</td><td>简答题：<span id="sdjdcount">0</span>/5</td></tr>
				          </table>
				        </div>
				       </div>
				       <div style="border:solid 1px #FFFFFF;width:99%">
				       	 <img alt="" style="cursor: pointer;margin-top:15px;" src="img/gl/yulan.jpg"
							onclick="YuLan()" />
					     <img alt="" style="cursor: pointer;margin:15px 0 0 30px;" src="img/gl/17.jpg"
							onclick="DirectSave()" />  
				       </div>

					</div>
				</div>
			</div>
			<div id="footer">
				<jsp:include page="footer.jsp" flush="true"></jsp:include>
			</div>
		</div>
		<div id="fullbg"></div>
		<div id="editpanel" class="opendiv">
			<div id="editbtm" class="opendivdom">
			    <div id="showtitle" ></div>
				<table id="khshow" cellpadding="0" cellspacing="0">
					<tr>
						<td class="ftd">
							时间：
						</td>
						<td>
							<span id="showtime"></span>
						</td>
					</tr>
					<tr>
						<td class="ftd">
							要求：
						</td>
						<td>
							<span id="showlong"></span>分钟作答，不可重复提交
						</td>
					</tr>
					<tr>
						<td class="ftd">
							说明：
						</td>
						<td>
						    1、考核设一等奖<span id="showad1key"></span>名，获得<span id="showad1name"></span>
						</td>
					</tr>
					<tr>
						<td class="ftd">
						</td>
						<td>
						    2、考核设二等奖<span id="showad2key"></span>名，获得<span id="showad2name"></span>
						</td>
					</tr>
					<tr>
						<td class="ftd">
						</td>
						<td>
						    3、考核设三等奖<span id="showad3key"></span>名，获得<span id="showad3name"></span>
						</td>
					</tr>
				</table>
				<div id="tipanle">
				  <table id="titable" cellpadding="0" cellspacing="0">
				    <tbody id="titbody">
				    
				    </tbody>
				    <tr>
					    <td style="padding-left:145px;padding-top:30px;" colspan="2">
					    <img alt="" style="cursor: pointer;" src="img/gl/17.jpg"
										onclick="SavePagerAfterYulan()" />
						<img alt="" style="cursor: pointer; margin-left: 50px;"
										src="img/gl/18.jpg" onclick="CancelUp()" />
					    </td>
				    </tr>
				    <tr><td colspan="2"></td></tr>
				  </table>
				</div>
			</div>
		</div>
	</body>
</html>
